Optimal. Leaf size=162 \[ \frac{1}{4} (-1)^{3/4} \sqrt{\pi } f^{a-\frac{1}{2}} e^{\frac{1}{4} i \left (4 d+\frac{(b \log (f)+i e)^2}{f}\right )} \text{Erf}\left (\frac{\sqrt [4]{-1} (b \log (f)+i e+2 i f x)}{2 \sqrt{f}}\right )-\frac{1}{4} (-1)^{3/4} \sqrt{\pi } f^{a-\frac{1}{2}} e^{\frac{i (e+i b \log (f))^2}{4 f}-i d} \text{Erfi}\left (\frac{\sqrt [4]{-1} (-b \log (f)+i e+2 i f x)}{2 \sqrt{f}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.333609, antiderivative size = 162, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.263, Rules used = {4472, 2287, 2234, 2204, 2205} \[ \frac{1}{4} (-1)^{3/4} \sqrt{\pi } f^{a-\frac{1}{2}} e^{\frac{1}{4} i \left (4 d+\frac{(b \log (f)+i e)^2}{f}\right )} \text{Erf}\left (\frac{\sqrt [4]{-1} (b \log (f)+i e+2 i f x)}{2 \sqrt{f}}\right )-\frac{1}{4} (-1)^{3/4} \sqrt{\pi } f^{a-\frac{1}{2}} e^{\frac{i (e+i b \log (f))^2}{4 f}-i d} \text{Erfi}\left (\frac{\sqrt [4]{-1} (-b \log (f)+i e+2 i f x)}{2 \sqrt{f}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4472
Rule 2287
Rule 2234
Rule 2204
Rule 2205
Rubi steps
\begin{align*} \int f^{a+b x} \sin \left (d+e x+f x^2\right ) \, dx &=\int \left (\frac{1}{2} i e^{-i d-i e x-i f x^2} f^{a+b x}-\frac{1}{2} i e^{i d+i e x+i f x^2} f^{a+b x}\right ) \, dx\\ &=\frac{1}{2} i \int e^{-i d-i e x-i f x^2} f^{a+b x} \, dx-\frac{1}{2} i \int e^{i d+i e x+i f x^2} f^{a+b x} \, dx\\ &=\frac{1}{2} i \int \exp \left (-i d-i f x^2+a \log (f)-x (i e-b \log (f))\right ) \, dx-\frac{1}{2} i \int \exp \left (i d+i f x^2+a \log (f)+x (i e+b \log (f))\right ) \, dx\\ &=\frac{1}{2} \left (i e^{-i d+\frac{i (e+i b \log (f))^2}{4 f}} f^a\right ) \int e^{\frac{i (-i e-2 i f x+b \log (f))^2}{4 f}} \, dx-\frac{1}{2} \left (i e^{\frac{1}{4} i \left (4 d+\frac{(i e+b \log (f))^2}{f}\right )} f^a\right ) \int e^{-\frac{i (i e+2 i f x+b \log (f))^2}{4 f}} \, dx\\ &=\frac{1}{4} (-1)^{3/4} e^{\frac{1}{4} i \left (4 d+\frac{(i e+b \log (f))^2}{f}\right )} f^{-\frac{1}{2}+a} \sqrt{\pi } \text{erf}\left (\frac{\sqrt [4]{-1} (i e+2 i f x+b \log (f))}{2 \sqrt{f}}\right )-\frac{1}{4} (-1)^{3/4} e^{-i d+\frac{i (e+i b \log (f))^2}{4 f}} f^{-\frac{1}{2}+a} \sqrt{\pi } \text{erfi}\left (\frac{\sqrt [4]{-1} (i e+2 i f x-b \log (f))}{2 \sqrt{f}}\right )\\ \end{align*}
Mathematica [A] time = 0.385259, size = 162, normalized size = 1. \[ -\frac{1}{4} \sqrt [4]{-1} \sqrt{\pi } f^{a-\frac{b e+f}{2 f}} e^{-\frac{i \left (b^2 \log ^2(f)+e^2\right )}{4 f}} \left (e^{\frac{i b^2 \log ^2(f)}{2 f}} (\cos (d)+i \sin (d)) \text{Erfi}\left (\frac{\sqrt [4]{-1} (-i b \log (f)+e+2 f x)}{2 \sqrt{f}}\right )+e^{\frac{i e^2}{2 f}} (\sin (d)+i \cos (d)) \text{Erfi}\left (\frac{(-1)^{3/4} (i b \log (f)+e+2 f x)}{2 \sqrt{f}}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.195, size = 152, normalized size = 0.9 \begin{align*}{{\frac{i}{4}}{f}^{a}\sqrt{\pi }{{\rm e}^{{\frac{{\frac{i}{4}} \left ( \left ( \ln \left ( f \right ) \right ) ^{2}{b}^{2}+2\,i\ln \left ( f \right ) be-{e}^{2}+4\,df \right ) }{f}}}}{\it Erf} \left ( -\sqrt{-if}x+{\frac{ie+b\ln \left ( f \right ) }{2}{\frac{1}{\sqrt{-if}}}} \right ){\frac{1}{\sqrt{-if}}}}-{{\frac{i}{4}}{f}^{a}\sqrt{\pi }{{\rm e}^{{\frac{-{\frac{i}{4}} \left ( \left ( \ln \left ( f \right ) \right ) ^{2}{b}^{2}-2\,i\ln \left ( f \right ) be-{e}^{2}+4\,df \right ) }{f}}}}{\it Erf} \left ( -\sqrt{if}x+{\frac{b\ln \left ( f \right ) -ie}{2}{\frac{1}{\sqrt{if}}}} \right ){\frac{1}{\sqrt{if}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: IndexError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.520653, size = 868, normalized size = 5.36 \begin{align*} \frac{i \, \sqrt{2} \pi \sqrt{\frac{f}{\pi }} e^{\left (\frac{-i \, b^{2} \log \left (f\right )^{2} + i \, e^{2} - 4 i \, d f - 2 \,{\left (b e - 2 \, a f\right )} \log \left (f\right )}{4 \, f}\right )} \operatorname{C}\left (\frac{\sqrt{2}{\left (2 \, f x + i \, b \log \left (f\right ) + e\right )} \sqrt{\frac{f}{\pi }}}{2 \, f}\right ) + i \, \sqrt{2} \pi \sqrt{\frac{f}{\pi }} e^{\left (\frac{i \, b^{2} \log \left (f\right )^{2} - i \, e^{2} + 4 i \, d f - 2 \,{\left (b e - 2 \, a f\right )} \log \left (f\right )}{4 \, f}\right )} \operatorname{C}\left (-\frac{\sqrt{2}{\left (2 \, f x - i \, b \log \left (f\right ) + e\right )} \sqrt{\frac{f}{\pi }}}{2 \, f}\right ) + \sqrt{2} \pi \sqrt{\frac{f}{\pi }} e^{\left (\frac{-i \, b^{2} \log \left (f\right )^{2} + i \, e^{2} - 4 i \, d f - 2 \,{\left (b e - 2 \, a f\right )} \log \left (f\right )}{4 \, f}\right )} \operatorname{S}\left (\frac{\sqrt{2}{\left (2 \, f x + i \, b \log \left (f\right ) + e\right )} \sqrt{\frac{f}{\pi }}}{2 \, f}\right ) - \sqrt{2} \pi \sqrt{\frac{f}{\pi }} e^{\left (\frac{i \, b^{2} \log \left (f\right )^{2} - i \, e^{2} + 4 i \, d f - 2 \,{\left (b e - 2 \, a f\right )} \log \left (f\right )}{4 \, f}\right )} \operatorname{S}\left (-\frac{\sqrt{2}{\left (2 \, f x - i \, b \log \left (f\right ) + e\right )} \sqrt{\frac{f}{\pi }}}{2 \, f}\right )}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int f^{a + b x} \sin{\left (d + e x + f x^{2} \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.31703, size = 518, normalized size = 3.2 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]